package com.ecahack.busstop.json;

import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;

import android.util.Log;

public class PostGingerbreadJSONParser extends JSONParser {

	private HttpURLConnection conn;
	
	@Override
	protected InputStream getInputStream(String url) throws IOException {
		conn = (HttpURLConnection) new URL(url).openConnection();
		int code = conn.getResponseCode();
		String msg = conn.getResponseMessage();
		Log.i(TAG, "HTTP Response code: " + code + " message: " + msg);
		return conn.getInputStream();
	}

	@Override
	protected void release() {
		if (conn != null) {
			conn.disconnect();
		}
	}


}
